package com.cloud.service.good.impl;

import com.cloud.bean.good.Good;
import com.cloud.mapper.good.GoodMapper;
import com.cloud.service.good.GoodService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liuyuan
 * @since 2022-07-26
 */
@Service
public class GoodServiceImpl extends ServiceImpl<GoodMapper, Good> implements GoodService {
    @Autowired
    GoodMapper goodMapper;

    @Override
    public List<Good> listByMenuId(Long id) {
        Map<String, Object> queryMap = new HashMap<>();
        queryMap.put("menu_id",id);
        return  goodMapper.selectByMap(queryMap);

    }
}
